作者:U友50140862 | 来源:互联网 | 2023-09-03 20:26
At work I have a VS plugin suggesting to change stuff like
1
| !foo.any(|bar| bar == baz) |
to
1
| foo.all(|bar| bar != baz) |
.
and
can usually be simplified.
It would be nice if
could suggest that too.
该提问来源于开源项目:rust-lang/rust-clippy
Personally I find
1
| !foo.any(|bar| bar == baz) |
to be cognitively simpler. My general rule is to defer "not" operators.